package com.duowei.diandan.db.dao;

import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;

import com.duowei.diandan.db.entry.RollMessage;

import java.util.List;

@Dao
public interface RollMessageDao {

    @Query("SELECT * FROM rollmessage")
    RollMessage findOne();

    @Query("SELECT * FROM rollmessage")
    LiveData<List<RollMessage>> findOne2();

    @Insert
    void insert(RollMessage item);

    @Update
    void update(RollMessage item);

    @Query("DELETE FROM rollmessage")
    void deleteAll();
}
